<extend name="public:template" />
<block name="title">管理员列表</block>
<block name="style">
    <link rel="stylesheet" href="__STATIC__/layui/css/layui.css" type="text/css">
</block>
<block name="content">

    <div class="wrap-page">
        <div id="pageBookList" class="page-content">
            <Admintemplate file="Common/SubTabs"/>
            <div id="boxBookList" class="box">
                <div class="box-content">
                    <div class="wrap-table">
                        <div class="table-bar table-bar-head clearfix">
                            <div class="fl-l">
                                <div class="tools">
                                    <span class="tool-item"><a class="button button-blue"  href="{:U('backend/admin/add')}" >新管理员</a></span>
                                    <span class="tool-item"><a class="button button-red btn-delete-batch" href="javascript:;" tips="确定禁用所选？" data-url="{:U('backend/admin/delete')}">批量禁用</a></span>
                                </div>
                            </div>
                            <div class="fl-r">
                                <div class="tools">
                                    <span class="tool-item"><button onclick="javascript:window.location.replace(window.location.href);" class="button button-default" type="button">刷新列表</button></span>
                                </div>
                            </div>
                        </div>
                            <table class="table default-style" cellpadding="0" cellspacing="0" width="100%">
                                <thead>
                                <tr>
                                <th width="40"><div class="th-inner"><input type="checkbox" name="checkall" class="J_checkall"></div></th>
                                <th width="40"><div class="th-inner">ID</div></th>
                                <th><div class="th-inner al-c">{:L('admin_username')}</div></th>
                                <th><div class="th-inner al-c">{:L('admininrole')}</div></th>
                                <th><div class="th-inner al-c">{:L('email')}</div></th>
                                <th><div class="th-inner al-c">{:L('mobile')}</div></th>
                                <th><div class="th-inner al-c">{:L('regtime')}</div></th>
                                <th><div class="th-inner al-c">{:L('lasttime')}</div></th>
                                <th><div class="th-inner al-c">{:L('regip')}</div></th>
                                <th><div class="th-inner al-c">{:L('lastip')}</div></th>
                                <th><div class="th-inner al-c">{:L('status')}</div></th>
                                <th width=100><div class="th-inner al-c">{:L('operations_manage')}</div></th>
                                </tr>
                                </thead>
                                <tbody>
                                <empty name="list">
                                    <tr class="empty"><td colspan="20"><div class="data-empty">暂无数据</div></td></tr>
                                </empty>
                                    <volist name="list" id="val">
                                        <tr>
                                        <td><div class="td-inner al-c"><input type="checkbox" class="J_checkitem" value="{$val.userid}"></div></td>
                                        <td><div class="td-inner al-l">{$val.userid}</div></td>
                                        <td><div class="td-inner al-l">{$val.username}</div></td>
                                        <td><div class="td-inner al-l">{$role[$val['role_id']]['name']}</div></td>
                                        <td><div class="td-inner al-l">{$val.email}</div></td>
                                        <td><div class="td-inner al-l">{$val.mobile}</div></td>
                                        <td><div class="td-inner al-l">{$val.regdate|date='Y-m-d H:i:s',###}</div></td>
                                        <td><div class="td-inner al-l">{$val.lastdate|date='Y-m-d H:i:s',###}</div></td>
                                        <td><div class="td-inner al-l">{$val.regip}</div></td>
                                        <td><div class="td-inner al-l">{$val.lastip}</div></td>
                                        <td>
                                            <div class="td-inner al-l">
                                            <if condition="$val.status eq 1"><font style="color: #006600">启用</font></if>
                                            <if condition="$val.status eq 0"><font style="color: red">停用</font></if>
                                            </div>
                                        </td>
                                        <td width="120">
                                            <div class="td-inner al-l">
                                        <if condition="$val.status eq 1">
                                        <a href="{:U('backend/admin/edit', array('id'=>$val['userid']))}"><i class="layui-icon layui-icon-edit">&#xe642;</i>{:L('edit')}</a> |
                                        <a href="javascript:;" class="layer_confirm" data-url="{:U('backend/admin/delete', array('id'=>$val['userid']))}" data-msg="{:sprintf(L('confirm_disabled_one'),$val['username'])}"><i class="layui-icon layui-icon-del">&#x1007;</i>{:L('disabled')}</a>
                                        </if>
                                        <if condition="$val.status eq 0">
                                        <a href="javascript:;" class="layer_confirm" data-url="{:U('backend/admin/recovery', array('id'=>$val['userid']))}" data-msg="{:sprintf(L('confirm_able_one'),$val['username'])}">{:L('able')}</a>
                                        </if>
                                                </div>
                                        </td>
                                        </tr>
                                    </volist>
                                </tbody>
                            </table>
                        <notempty name="page">
                        <div class="table-bar table-bar-foot clearfix page-container">
                            <div class="fl-r">
                                <div class="tools">
                                    <span class="tool-item tool-text">
                                        <span class="pagging">{$page}</span>
                                        <span></span>
                                    </span>
                                </div>
                            </div>
                        </div>
                        </notempty>
                    </div>
                </div>
            </div>
        </div>
    </div>
</block>
